<?php
require_once 'Apk/autoload.php';
class NVL_Apk{
    
    public function __construct()
    {
       
    }
    public function getPackageName($file){
        $apk = new \ApkParser\Parser($file);
        return $apk->getManifest()->getPackageName();
    }
    public function getVersion($file){
        $apk = new \ApkParser\Parser($file);
        $result=array();
        $result['name'] = $apk->getManifest()->getVersionName();
        $result['code'] = $apk->getManifest()->getVersionCode();
        return $result;
    }
    public function getVersionName($file){
        $apk = new \ApkParser\Parser($file);
        return $apk->getManifest()->getVersionName();
    }
    public function getApkInfo($file){
        $apk = new \ApkParser\Parser($file);
        $result=array();
        $result['PackageName'] = $apk->getManifest()->getPackageName();
        $result['VersionName'] = $apk->getManifest()->getVersionName();
        $result['VersionCode'] = $apk->getManifest()->getVersionCode();
        $result['Permissions'] = $apk->getManifest()->getPermissions();
        return $result;
        
    }
}